<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

use App\Models\Traits\Admin\ActionButtonTrait;
use Illuminate\Database\Eloquent\SoftDeletes;

class Notice extends Model
{
    use ActionButtonTrait, SoftDeletes;
    
    protected $append = ['actionButton'];
    protected $actions = ['edit', 'publishNotice', 'delete'];

    protected $actionUri = 'notices';

    protected $fillable = [
    	'title', 'content', 'type', 'recipient'
    ];

    public function notice_manager()
    {
    	return $this->hasMany(NoticeManager::class, 'notice_id', 'id');
    }
}
